//
//  Activity.m
//  奇阅
//
//  Created by 奇阅科技 on 14-10-28.
//  Copyright (c) 2014年 奇阅科技. All rights reserved.
//

#import "Activity.h"

@implementation Activity
+(NSString *)getTableName
{
    return @"Activity";
}
+(Activity *)getFromDict:(NSDictionary *)dict{
    Activity *user = [Activity new];
    user.activityid = [dict objectForKey:@"id"];
    user.title = [dict objectForKey:@"title"];
    user.contents = [dict objectForKey:@"contents"];
    user.ico = [dict objectForKey:@"ico"];
    user.url = [dict objectForKey:@"url"];
    user.is_sticky = [[dict objectForKey:@"is_sticky"] integerValue];
    user.time = [dict objectForKey:@"time"];
    user.position = [dict objectForKey:@"position"];
    return user;
}
//更新 数据
-(void)upDateNew:(Activity *)newActivity{
    self.title = newActivity.title;
    self.contents = newActivity.contents;
    self.ico = newActivity.ico;
    self.url = newActivity.url;
    self.is_sticky = newActivity.is_sticky;
    self.time = newActivity.time;
    self.position = newActivity.position;
}
@end
